#pragma once
#include <QWidget>
#include <QLineEdit>
#include <QPushButton>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QIntValidator>
#include <QLabel>
#include <QRegularExpressionValidator>

enum class  CmdType {
    STOP = 0,  // stop
    LOITER = 1,  // loiter
    ARM = 2,   // arm可能用不上
    DISARM = 3,   // arm可能用不上
    TAKEOFF = 4, // takeoff
    LAND = 5,  // land
    RETURN_HOME = 6,  // return home
    WAYPOINT = 7,  // waypoint
};

class Control : public QWidget
{
    Q_OBJECT

public:
    Control(QWidget *parent = nullptr);

signals:
    void connectClicked(const std::string ip, int port);
    void cmdBtnClicked(const int cmd_type , const int drone_id, const std::vector<float> data_f, 
                        const std::vector<int> data_i, const std::string data_s);
};